<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
		<div style="width:380px;margin:0 auto;margin-top:50px;">
			<ul class="pagination" style="text-align:center; margin-top:10px;">
				<!-- 上一页 -->
				<!-- 判断是否是第一页 -->
				<c:if test="${pb.pageNumber == 1 }">
					<li class="disabled">
						<a href="javascript:void(0)" aria-label="Previous">
							<span aria-hidden="true">&laquo;</span>
						</a>
					</li>
				</c:if>
				
				<!-- 判断是否是第一页 -->
				<c:if test="${pb.pageNumber != 1 }">
					<li>
						<a href="${pageContext.request.contextPath}/order?method=findMyOrderByPage&pageNumber=${pb.pageNumber-1}&cid=${param.cid}" aria-label="Previous">
							<span aria-hidden="true">&laquo;</span>
						</a>
					</li>
				</c:if>
				
				<c:forEach begin="1" end="${pb.totalPage }" var="n">
					<!-- 判断是否是当前页 -->
					<c:if test="${pb.pageNumber == n }">	
						<li class="active"><a href="javascript:void(0)">${n }</a></li>
					</c:if>
					<c:if test="${pb.pageNumber != n }">	
						<li><a href="${pageContext.request.contextPath}/order?method=findMyOrderByPage&pageNumber=${n}&cid=${param.cid}">${n }</a></li>
					</c:if>
				</c:forEach>
				<!-- 下一页 -->
				<!-- 判断是否最后一页 -->
				<c:if test="${pb.pageNumber ==  pb.totalPage}">
					<li class="disabled">
						<a href="javascript:void(0)" aria-label="Next">
							<span aria-hidden="true">&raquo;</span>
						</a>
					</li>
				</c:if>
				
				<!-- 判断不是最后一页 -->
				<c:if test="${pb.pageNumber !=  pb.totalPage}">
					<li >
						<a href="${pageContext.request.contextPath }/order?method=findMyOrderByPage&pageNumber=${pb.pageNumber+1}&cid=${param.cid}" aria-label="Next">
							<span aria-hidden="true">&raquo;</span>
						</a>
					</li>
				</c:if>
				
			</ul>
		</div>
		<!-- 分页结束======================= -->
</body>
</html>